<h1>留言清單</h1>

<table>
  <tr>
    <th>User name</th>
    <th>User link</th>
    <th>Content</th>
  </tr>

<% for post in @posts %>
  <tr>
    <td><%=h post.user_name %></td>
    <td><%=h post.user_link %></td>
    <td><%=h post.content %></td>
    <td><%= link_to 'Show', post %></td>
    <td><%= edit_post(post) %></td>
    <td><%= delete_post(post) %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New post', new_post_path %>
